function write_cf_file( filename, cfm )
%write_cf_file Write concentrate force data into file
%   Detailed explanation goes here
    row = size(cfm,1);
    col = size(cfm,2);
    fid = fopen(filename, 'w');
    fprintf(fid, '%12d', cfm(1,1));
    for j=2:col
        fprintf(fid, ', %12d', cfm(1,j));
    end
    fprintf(fid, '\n');
    for i=2:row
        fprintf(fid, '%12.5e', cfm(i,1));
        for j=2:col
            fprintf(fid, ', %12.5e', cfm(i,j));
        end
        fprintf(fid, '\n');
    end
    fclose(fid);
end

